<template>
  <el-form ref="form" :model="form" label-width="100px">
    <el-form-item label="话题名称">
      <el-input v-model="form.name"></el-input>
    </el-form-item>
    <el-form-item label="标题">
      <el-input v-model="form.subname"></el-input>
    </el-form-item>
    <!-- <el-form-item label="文章来源">
      <el-select
        v-model="form.region"
        placeholder="请选择案例分类"
        style="width: 100%;"
      >
        <el-option label="网络转载" value="0"></el-option>
        <el-option label="原创" value="1"></el-option>
      </el-select>
    </el-form-item> -->
    <el-form-item label="描述内容">
      <Editor v-model="content" />
    </el-form-item>

    <el-form-item>
      <el-button type="primary" @click="onSubmit">添加话题</el-button>
      <el-button>取消</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
import Editor from "@/components/Editor.vue";
export default {
  components: {
    Editor
  },
  data() {
    return {
      form: {
        name: "",
        subname: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        content: ""
      }
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    }
  }
};
</script>

<style></style>
